package com.bw.controller;

import com.bw.bean.Vo;
import com.bw.service.VoService;
import com.sugar.SugarUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class VoController {
    @Autowired
    VoService voService;


    @RequestMapping("list1")
    public Map getList1(){
        Double val = voService.getList1();
        return SugarUtil.getFlipNumberData(val);
    }

    @RequestMapping("list2")
    public Map getList2(){
        List<Vo> list2 = voService.getList2();
        return SugarUtil.getMapData(list2);
    }
    @RequestMapping("list3")
    public Map getList3(){
        List<Vo> list3 = voService.getList3();
        return SugarUtil.getBarData(list3);
    }

    @RequestMapping("list4")
    public List<Map> getList4(){
        return voService.getList4();
    }

    @RequestMapping("list5")
    public List<Map> getList5(){
        return voService.getList5();
    }
    @RequestMapping("list6")
    public List<Map> getList6(){
        return voService.getList6();
    }

    @RequestMapping("list7")
    public List<Map> getList7(){
        return voService.getList7();
    }

}
